home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-01 | 7.5 KB | 215 lines | [TEXT/MPS ] |
- {
- File: Folders.p
-
- Contains: Folder Manager Interfaces.
-
- Version: Technology: Some
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- }
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes := 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT Folders;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED __FOLDERS__}
- {$SETC __FOLDERS__ := 1}
-
- {$I+}
- {$SETC FoldersIncludes := UsingIncludes}
- {$SETC UsingIncludes := 1}
-
- {$IFC UNDEFINED __TYPES__}
- {$I Types.p}
- {$ENDC}
- {$IFC UNDEFINED __CODEFRAGMENTS__}
- {$I CodeFragments.p}
- {$ENDC}
- {$IFC FOR_SYSTEM8_PREEMPTIVE }
- {$IFC UNDEFINED __FILEMANAGERTYPES__}
- {$I FileManagerTypes.p}
- {$ENDC}
- {$ENDC}
-
- {$PUSH}
- {$ALIGN MAC68K}
- {$LibExport+}
-
- {$IFC FOR_SYSTEM7_AND_SYSTEM8_PREEMPTIVE }
-
- CONST
- kOnSystemDisk = $8000;
- kCreateFolder = 1;
- kDontCreateFolder = 0;
- kSystemFolderType = 'macs'; { the system folder }
- kDesktopFolderType = 'desk'; { the desktop folder; objects in this folder show on the desk top. }
- kTrashFolderType = 'trsh'; { the trash folder; objects in this folder show up in the trash }
- kWhereToEmptyTrashFolderType = 'empt'; { the "empty trash" folder; Finder starts empty from here down }
- kPrintMonitorDocsFolderType = 'prnt'; { Print Monitor documents }
- kStartupFolderType = 'strt'; { Finder objects (applications, documents, DAs, aliases, to...) to open at startup go here }
- kShutdownFolderType = 'shdf'; { Finder objects (applications, documents, DAs, aliases, to...) to open at shutdown go here }
- kAppleMenuFolderType = 'amnu'; { Finder objects to put into the Apple menu go here }
- kControlPanelFolderType = 'ctrl'; { Control Panels go here (may contain INITs) }
- kExtensionFolderType = 'extn'; { Finder extensions go here }
- kFontsFolderType = 'font'; { Fonts go here }
- kPreferencesFolderType = 'pref'; { preferences for applications go here }
- kTemporaryFolderType = 'temp'; { temporary files go here (deleted periodically, but don't rely on it.) }
-
- FUNCTION FindFolder(vRefNum: INTEGER; folderType: OSType; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $7000, $A823;
- {$ENDC}
- FUNCTION ReleaseFolder(vRefNum: INTEGER; folderType: OSType): OSErr;
- {$IFC NOT GENERATINGCFM}
- INLINE $700B, $A823;
- {$ENDC}
- {$ENDC}
- {$IFC FOR_SYSTEM8_PREEMPTIVE }
- { **************************************** }
- { Extensible Folder Manager declarations }
- { **************************************** }
- { ************************** }
- { Folder Manager constants }
- { ************************** }
- { new gestalt constants for gestalt FindFolderAttr (to be moved to Gestalt.h) }
-
- CONST
- gestaltFolderDescSupport = 1; { has FolderDesc calls }
-
- { new Folder Manager error codes }
- badFolderDescErr = -4270;
- duplicateFolderDescErr = -4271;
- noMoreFolderDescErr = -4272;
- invalidFolderTypeErr = -4273;
- duplicateRoutingErr = -4274;
- routingNotFoundErr = -4275;
- badRoutingSizeErr = -4276;
-
- kExtensionDisabledFolderType = 'extD';
- kControlPanelDisabledFolderType = 'ctrD';
- kSystemExtensionDisabledFolderType = 'macD';
- kApplicationsFolderType = 'apps';
- kDocumentsFolderType = 'docs';
-
- { new constants }
- kVolumeRootFolderType = 'root'; { root folder of a volume }
- kGlobalPreferencesFolderType = 'gprf'; { preferences for all users/workspaces }
- kChewableItemsFolderType = 'flnt'; { items deleted at boot }
- kApplicationSupportFolderType = 'asup'; { third-party items and folders }
- kSystem7SystemFolderType = 'ƒblu'; { System 7 system folder }
- kDebuggerExtensionsFolderType = 'ƒdeb'; { debugger extensions }
- kDesktopModulesFolderType = 'ƒdsk'; { desktop animation modules }
- kEditorsFolderType = 'ƒedi'; { OpenDoc editors }
- kExtensionLibrariesFolderType = 'ƒexl'; { leechlets }
- kCoopExtensionLibrariesFolderType = 'ƒcex'; { blue leechlets }
- kHardwareSupportFolderType = 'ƒhdw'; { hardware support }
- kLocalesFolderType = 'ƒloc'; { locales }
- kServerLibrariesFolderType = 'ƒser'; { servers }
- kSystemLibrariesFolderType = 'ƒsys'; { system libraries }
- kTextEncodingsFolderType = 'ƒtex'; { encoding tables }
- kThemesFolderType = 'ƒthm'; { themes }
- kStationeryFolderType = 'ƒstn'; { stationery }
-
- { FolderDescFlags values }
- kPersistentFolderDesc = $00000001;
- kCreateFolderAtBoot = $00000002;
- kFolderCreatedInvisible = $00000004;
- kFolderCreatedNameLocked = $00000008;
-
-
- TYPE
- FolderDescFlags = UInt32;
- { FolderClass values }
-
- CONST
- kRelativeFolder = 'relf';
- kSpecialFolder = 'spcf';
-
-
- TYPE
- FolderClass = OSType;
-
- CONST
- doReplace = 1;
- dontReplace = 0;
-
- { known FolderType values }
- kBlessedFolder = 'blsf';
- kCurrentWorkspaceFolder = 'cwsf';
- kRootFolder = 'rotf';
- kWorkspacesFolder = 'wksf';
-
-
- TYPE
- FolderType = OSType;
- FolderLocation = OSType;
- FolderDescPtr = ^FolderDesc;
- FolderDesc = RECORD
- descSize: Size;
- foldType: FolderType;
- flags: FolderDescFlags;
- foldClass: FolderClass;
- foldLocation: FolderType;
- badgeSignature: OSType;
- badgeType: OSType;
- reserved: UInt32;
- name: Str63;
- END;
-
- RoutingFlags = UInt32;
- FolderRoutingPtr = ^FolderRouting;
- FolderRouting = RECORD
- descSize: Size;
- fileType: OSType;
- routeFromFolder: FolderType;
- routeToFolder: FolderType;
- flags: RoutingFlags;
- END;
-
- { routing constants }
-
- CONST
- kPersistentRouting = $00000001;
-
- { ************************* }
- { Folder Manager routines }
- { ************************* }
- { Folder Manager administration routines }
- FUNCTION AddFolderDescriptor(foldType: FolderType; flags: FolderDescFlags; foldClass: FolderClass; foldLocation: FolderLocation; badgeSignature: OSType; badgeType: OSType; VAR name: Str63; replaceFlag: BOOLEAN): OSErr;
- FUNCTION GetFolderDescriptor(foldType: FolderType; descSize: Size; VAR foldDesc: FolderDesc): OSErr;
- FUNCTION GetFolderTypes(requestedTypeCount: UInt32; VAR totalTypeCount: UInt32; VAR theTypes: FolderType): OSErr;
- FUNCTION RemoveFolderDescriptor(foldType: FolderType): OSErr;
- FUNCTION FindFolderFSObject(foldType: FolderType; createFolder: BOOLEAN; VAR objectRef: FSObjectRef): OSErr;
- FUNCTION NewFindFolder(vRefNum: INTEGER; foldType: FolderType; createFolder: BOOLEAN; VAR foundVRefNum: INTEGER; VAR foundDirID: LONGINT): OSErr;
- FUNCTION InvalidateFolderDescriptorCache(vRefNum: INTEGER; dirID: LONGINT): OSErr;
- { legacy routines }
- FUNCTION GetFolderName(vRefNum: INTEGER; foldType: OSType; VAR foundVRefNum: INTEGER; name: StringPtr): OSErr;
- { routing routines }
- FUNCTION AddFolderRouting(fileType: OSType; routeFromFolder: FolderType; routeToFolder: FolderType; flags: RoutingFlags; replaceFlag: BOOLEAN): OSErr;
- FUNCTION RemoveFolderRouting(fileType: OSType; routeFromFolder: FolderType): OSErr;
- FUNCTION FindFolderRouting(fileType: OSType; routeFromFolder: FolderType; VAR routeToFolder: FolderType; VAR flags: RoutingFlags): OSErr;
- FUNCTION GetFolderRoutings(requestedRoutingCount: UInt32; VAR totalRoutingCount: UInt32; routingSize: Size; VAR theRoutings: FolderRouting): OSErr;
- {$ENDC}
- {$ALIGN RESET}
- {$POP}
-
- {$SETC UsingIncludes := FoldersIncludes}
-
- {$ENDC} {__FOLDERS__}
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-